from django.db import models
from login.models import UserRole
# Create your models here.
class Tab(models.Model):
    '''
    主页侧边栏选项卡
    '''
    tab = models.CharField(max_length=40, verbose_name='主选项卡')
    icon = models.CharField(max_length=40, verbose_name='选项卡图标', default='')
    url = models.CharField(max_length=200, verbose_name='网址', default='')
    trid = models.ForeignKey("login.UserRole", verbose_name='角色名称', on_delete=models.CASCADE, null=True)
    class Meta:
        # 定义表名
        db_table = "tabInfo"
        # 定义在管理后台显示的名称
        verbose_name = '主选项卡'
        # 定义复数时的名称（去除复数的s）
        verbose_name_plural = verbose_name
    def __str__(self):
        return self.tab

class SecondLevelTab(models.Model):
    '''
    主页侧边栏二级选项卡
    '''
    secondLevelTab = models.CharField(max_length=40, verbose_name='二级选项卡')
    url = models.CharField(max_length=200, verbose_name='网址', default='')
    tab = models.ForeignKey('Tab', on_delete=models.CASCADE, verbose_name='主选项卡')
    class Meta:
        db_table = "secondLevelTabInfo"
        # 定义在管理后台显示的名称
        verbose_name = '二级选项卡'
        # 定义复数时的名称（去除复数的s）
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.secondLevelTab


class InformationFormData(models.Model):

    form_78_list = (
        (0, '待审核'),
        (1, '已审核'),
    )
    '''
    提交表单信息
    '''
    form_1 = models.CharField(max_length=255, verbose_name='企业（单位）详细名称', db_column='企业（单位）详细名称')
    form_2 = models.CharField(max_length=255, verbose_name='单位注册时间', db_column='单位注册时间')
    form_3 = models.CharField(max_length=255, verbose_name='单位入孵时间', db_column='单位入孵时间')
    form_4 = models.CharField(max_length=255, verbose_name='企业负责人', db_column='企业负责人')
    form_5 = models.CharField(max_length=255, verbose_name='企业（单位）通讯地址', db_column='企业（单位）通讯地址')
    form_6 = models.CharField(max_length=255, verbose_name='产业领域', db_column='产业领域')
    form_7 = models.CharField(max_length=50, verbose_name='是否科技型中小企业（入库）', db_column='是否科技型中小企业（入库）')
    form_8 = models.CharField(max_length=20, verbose_name='是否高新技术（培育）企业', db_column='是否高新技术（培育）企业')
    form_9 = models.CharField(max_length=20, verbose_name='是否市级高成长创新型企业', db_column='是否市级高成长创新型企业')
    form_10 = models.CharField(max_length=20, verbose_name='是否领军人才企业', db_column='是否领军人才企业')
    form_11 = models.CharField(max_length=20, verbose_name='是否瞪羚和瞪羚培育企业', db_column='是否瞪羚和瞪羚培育企业')
    form_12 = models.CharField(max_length=20, verbose_name='是否独角兽和独角兽培育企业', db_column='是否独角兽和独角兽培育企业')
    form_13 = models.CharField(max_length=10, verbose_name='员工总数', db_column='员工总数')
    form_14 = models.CharField(max_length=10, verbose_name='外籍人员数', db_column='外籍人员数')
    form_15 = models.CharField(max_length=10, verbose_name='海归人员数', db_column='海归人员数')
    form_16 = models.CharField(max_length=10, verbose_name='博士人数', db_column='博士人数')
    form_17 = models.CharField(max_length=10, verbose_name='硕士人数', db_column='硕士人数')
    form_18 = models.CharField(max_length=10, verbose_name='本科人数', db_column='本科人数')
    form_19 = models.CharField(max_length=10, verbose_name='其他人数', db_column='其他人数')
    form_20 = models.CharField(max_length=10, verbose_name='杰青人数', db_column='杰青人数')
    form_21 = models.CharField(max_length=255, verbose_name='杰青姓名', db_column='杰青姓名')
    form_22 = models.CharField(max_length=10, verbose_name='青千人数', db_column='青千')
    form_23 = models.CharField(max_length=255, verbose_name='青千姓名', db_column='青千姓名')
    form_24 = models.CharField(max_length=10, verbose_name='万人人数', db_column='万人')
    form_25 = models.CharField(max_length=255, verbose_name='万人姓名', db_column='万人姓名')
    form_26 = models.CharField(max_length=255, verbose_name='高级职称', db_column='高级职称')
    form_27 = models.CharField(max_length=255, verbose_name='中级职称', db_column='中级职称')
    form_28 = models.CharField(max_length=255, verbose_name='初级职称', db_column='初级职称')
    form_29 = models.CharField(max_length=10, verbose_name='累计拥有有效发明专利数量', db_column='累计拥有有效发明专利数量')
    form_30 = models.CharField(max_length=10, verbose_name='当年发明专利申请数', db_column='当年发明专利申请数')
    form_31 = models.CharField(max_length=10, verbose_name='累计获得授权专利', db_column='累计获得授权专利')
    form_32 = models.CharField(max_length=10, verbose_name='当年获得授权专利', db_column='当年获得授权专利')
    form_33 = models.CharField(max_length=10, verbose_name='累计PCT申请数', db_column='累计PCT申请数')
    form_34 = models.CharField(max_length=10, verbose_name='当年PCT申请数', db_column='当年PCT申请数')
    form_35 = models.CharField(max_length=10, verbose_name='累计申请实用新型专利数', db_column='累计申请实用新型专利数')
    form_36 = models.CharField(max_length=10, verbose_name='当年申请实用新型专利数', db_column='当年申请实用新型专利数')
    form_37 = models.CharField(max_length=10, verbose_name='累计软件著作权件数', db_column='累计软件著作权件数')
    form_38 = models.CharField(max_length=10, verbose_name='当年软件著作权件数', db_column='当年软件著作权件数')
    form_39 = models.CharField(max_length=10, verbose_name='发表论文总数（篇）', db_column='发表论文总数（篇）')
    form_40 = models.CharField(max_length=10, verbose_name='当年发表论文数', db_column='当年发表论文数')
    form_41 = models.CharField(max_length=255, verbose_name='国家级人才工程入选者姓名', db_column='国家级人才工程入选者姓名')
    form_42 = models.CharField(max_length=255, verbose_name='国家级人才工程当年新增人才姓名', db_column='国家级人才工程当年新增人才姓名')
    form_43 = models.CharField(max_length=255, verbose_name='省双创人才姓名', db_column='省双创人才姓名')
    form_44 = models.CharField(max_length=255, verbose_name='省双创人才当年新增人才姓名', db_column='省双创人才当年新增人才姓名')
    form_45 = models.CharField(max_length=255, verbose_name='姑苏领军人才姓名', db_column='姑苏领军人才姓名')
    form_46 = models.CharField(max_length=255, verbose_name='姑苏领军人才当年新增人才姓名', db_column='姑苏领军人才当年新增人才姓名')
    form_47 = models.CharField(max_length=255, verbose_name='姑苏天使人才姓名', db_column='姑苏天使人才姓名')
    form_48 = models.CharField(max_length=255, verbose_name='姑苏天使人才当年新增人才姓名', db_column='姑苏天使人才当年新增人才姓名')
    form_49 = models.CharField(max_length=255, verbose_name='园区领军人才姓名', db_column='园区领军人才姓名')
    form_50 = models.CharField(max_length=255, verbose_name='园区领军人才当年新增人才姓名', db_column='园区领军人才当年新增人才姓名')
    form_51 = models.CharField(max_length=50, verbose_name='当年研发经费投入（万元）', db_column='当年研发经费投入（万元）')
    form_52 = models.CharField(max_length=50, verbose_name='当年服务收入（万元）', db_column='当年服务收入（万元）')
    form_53 = models.CharField(max_length=50, verbose_name='累计服务收入总额（万元）', db_column='累计服务收入总额（万元）')
    form_54 = models.CharField(max_length=50, verbose_name='当年利润总额（万元）', db_column='当年利润总额（万元）')
    form_55 = models.CharField(max_length=50, verbose_name='累计利润总额（万元）', db_column='累计利润总额（万元）')
    form_56 = models.CharField(max_length=50, verbose_name='当年纳税总额（万元）', db_column='当年纳税总额（万元）')
    form_57 = models.CharField(max_length=50, verbose_name='当年对外提供技术服务企业数', db_column='当年对外提供技术服务企业数')
    form_58 = models.CharField(max_length=50, verbose_name='其中园区企业占比', db_column='其中园区企业占比')
    form_59 = models.CharField(max_length=50, verbose_name='累计对外提供技术服务企业数', db_column='累计对外提供技术服务企业数')
    form_60 = models.CharField(max_length=50, verbose_name='当年新增政府政策资助总额（万元）', db_column='当年新增政府政策资助总额（万元）')
    form_61 = models.CharField(max_length=50, verbose_name='累计获得的政府政策资助总额（万元）', db_column='累计获得的政府政策资助总额（万元）')
    form_62 = models.CharField(max_length=50, verbose_name='仪器设备投入（万元）', db_column='仪器设备投入（万元）')
    form_63 = models.CharField(max_length=50, verbose_name='当年获得风险融资金额', db_column='当年获得风险融资金额')
    form_64 = models.CharField(max_length=50, verbose_name='累计获得风险融资金额', db_column='累计获得风险融资金额')
    form_65 = models.CharField(max_length=50, verbose_name='当年贷款金额', db_column='当年贷款金额')
    form_66 = models.CharField(max_length=50, verbose_name='累计贷款金额', db_column='累计贷款金额')
    form_67 = models.CharField(max_length=50, verbose_name='当年获批国家级项目个数', db_column='当年获批国家级项目个数')
    form_68 = models.CharField(max_length=255, verbose_name='当年获批国家级项目名称', db_column='当年获批国家级项目名称')
    form_69 = models.CharField(max_length=50, verbose_name='当年获批省级项目个数', db_column='当年获批省级项目个数')
    form_70 = models.CharField(max_length=255, verbose_name='当年获批省级项目名称', db_column='当年获批省级项目名称')
    form_71 = models.CharField(max_length=50, verbose_name='当年获批市级项目个数', db_column='当年获批市级项目个数')
    form_72 = models.CharField(max_length=255, verbose_name='当年获批市级项目名称', db_column='当年获批市级项目名称')
    form_73 = models.CharField(max_length=255, verbose_name='企业联系人姓名', db_column='企业联系人姓名')
    form_74 = models.CharField(max_length=255, verbose_name='企业联系人手机号', db_column='企业联系人手机号')
    form_75 = models.CharField(max_length=255, verbose_name='企业联系人邮箱', db_column='企业联系人邮箱')
    form_76 = models.CharField(max_length=20, verbose_name='操作人', db_column='操作人')
    form_77 = models.DateTimeField(null=True, verbose_name='操作时间', db_column='操作时间', auto_now=True)
    form_78 = models.IntegerField(verbose_name='审核状态', db_column='审核状态', choices=form_78_list, default=0)
    class Meta:
        db_table = "InformationFormData"
        # 定义在管理后台显示的名称
        verbose_name = '信息填报表单信息'
        # 定义复数时的名称（去除复数的s）
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.form_1